package com.foreknow.mapping;

import com.foreknow.model.Emp;

import java.sql.ResultSet;
import java.sql.SQLException;

public class EmpMapping implements EntityMapping {
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Emp emp = new Emp();
        emp.setEmpno(rs.getInt("empno"));
        emp.setEname(rs.getString("ename"));
        emp.setJob(rs.getString("job"));
        return emp;
    }
}
